#!/usr/bin/env python
# -*- coding: utf-8 -*-
import threading
import time

class logic():
    def __init__(self):
        pass

    def main(self, a, x):
        while True:
            y = int(a)+int(x)
            self.w1.insert(1.0, str(y)+'\n')
            time.sleep(1)
            x += 1

    def event(self, a, w1):
        '''调用main的方法'''
        self.w1 = w1
        x = 1
        self.main(a, x)

class Ymodem_Serial():
    def __init__(self):
        pass
    def main(self, a, x):
        while True:
            time.sleep(1)
